/*********************************************************
          File Name:10.20.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Fri 26 Feb 2016 07:35:22 PM CST
**********************************************************/

#include <iostream>
#include <algorithm>
#include <list>
#include <string>

int main()
{
    std::list<std::string> ls{"this", "is", "a", "test"};
    std::string::size_type limit = 3;
    
    auto res = std::count_if(ls.cbegin(), ls.cend(), 
            [limit](const std::string &s) -> bool {
                return s.size() > limit;
            });
    std::cout << "=> " << res << "\n";

    return 0;
}
